package com.itheima.mapper;

import com.itheima.pojo.Account;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;


public interface AccountMapper {
    @Select("select * from acount where id = #{id}")
    public Account findById(Integer id);

    @Insert("insert into acount (id, name, salary, pass) values (null,#{name},#{salary},#{pass})")
    public int save(Account account);

    @Update("update acount set name=#{name},salary=#{salary},pass=#{pass} where id =#{id}")
    public int update(Account account);

    @Delete("delete from acount where id =#{id}")
    public int delete(Integer id);
}
